package com.yuw.homework4;

public class SalesEmployee extends ColaEmployee {
    // 属性
    private double saleTotal; // 销售总额
    private double saleRate; // 提成率

    // 行为

    public SalesEmployee(String empName, int empBirthMonth, double saleTotal, double saleRate) {
        super(empName, empBirthMonth);
        this.saleTotal = saleTotal;
        this.saleRate = saleRate;
    }

    @Override
    public double getSalary(int month) {
        return saleRate * saleTotal + super.getSalary(month);
    }
}
